//
//  OMAboutViewController.m
//  OMENGO
//
//  Created by 梁尚嘉 on 2017/4/20.
//  Copyright © 2017年 Kamfat. All rights reserved.
//

#import "OMAboutViewController.h"

@interface OMAboutViewController ()

@end

@implementation OMAboutViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    self.title = @"关于";

    UIImageView *imageView = [[UIImageView alloc]initWithImage:[UIImage imageNamed:@"AppIcon60x60@3x"]];
    [self.view addSubview:imageView];
    imageView.layer.cornerRadius = SM_SIZE(10);
    imageView.clipsToBounds = YES;
    [imageView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerX.equalTo(self.view.mas_centerX);
        make.top.equalTo(self.navigationBar.mas_bottom).offset(SM_SIZE(150));
        make.width.height.equalTo(@(SM_SIZE(180)));
    }];


    UILabel *versionLabel             = [UILabel new];
    versionLabel.font        = SM_CFont(34);
    versionLabel.textColor   = SM_darkGrayColor;
    versionLabel.text        = [NSString stringWithFormat:@"版本：%@",[[NSBundle mainBundle] infoDictionary][@"CFBundleShortVersionString"]];
    [self.view addSubview:versionLabel];
    [versionLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(imageView.mas_bottom).offset(SM_SIZE(60));
        make.centerX.equalTo(self.view.mas_centerX);
    }];


    UILabel *copyrightLabel             = [UILabel new];
    copyrightLabel.font        = SM_CFont(25);
    copyrightLabel.textColor   = SM_grayColor;
    copyrightLabel.text        = [NSString stringWithFormat:@"Copyright © %@, Foshan Steward-master Information Technonoly Co., Ltd. All Rights Reserved.",[NSString getTimeRemind:[[NSDate date] timeIntervalSince1970] withFormat:@"yyyy"]];
    copyrightLabel.textAlignment = NSTextAlignmentCenter;
    copyrightLabel.numberOfLines = 0;
    [self.view addSubview:copyrightLabel];
    [copyrightLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerX.equalTo(self.view.mas_centerX);
        make.bottom.equalTo(@(SM_SIZE(-60)));
        make.left.equalTo(@(SM_SIZE(30)));
        make.right.equalTo(@(SM_SIZE(-30)));
    }];
    
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
